package com.complaint.rest.user.dto;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by Alex
 */
public class ComplaintForm implements Serializable {
    private String id;
    private String authorId;
    private String subject;
    private String description;
    @DateTimeFormat(pattern = "dd/MM/yyyy")
    private Date publishDate;

    public ComplaintForm() {
    }

    public ComplaintForm(String id, String authorId, String subject, String description, Date publishDate) {
        this.id = id;
        this.authorId = authorId;
        this.subject = subject;
        this.description = description;
        this.publishDate = publishDate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public boolean isNew() {
        return id == null;
    }
}
